﻿@using MZBlog.Core.Extensions
@inherits Nancy.ViewEngines.Razor.NancyRazorViewBase<MZBlog.Core.ViewProjections.Home.IntervalBlogPostsViewModel>
@{
    Layout = "_Layout.cshtml";
}

<h2>
    归档: @Model.FromDate.ToString("yyyy年MM月")
</h2>

@foreach (var blogPost in Model.Posts)
{
    <article class="panel panel-default">
        <header class="panel-heading">
            <h3 class="panel-title">
                <a href="@blogPost.GetLink()">@blogPost.Title</a>
            </h3>
        </header>
        <div class="panel-meta text-right">
            <span class="author">@blogPost.AuthorDisplayName</span>
            发表于
            <time pubdate>@blogPost.PubDate.ToChineseTime().ToString("yyyy-MM-dd HH:mm")</time>
            , 阅读
            (<span class="viewcount">@blogPost.ViewCount</span>)
        </div>
        <div class="panel-body">
            @Html.Raw(blogPost.Description)
            <a href="@blogPost.GetLink()">阅读全文</a>
        </div>
        <div class="panel-footer">
            <i class="glyphicon glyphicon-tags"></i>
            @foreach (var tag in blogPost.Tags)
            {
                <text> [ <a href="~/tag/@tag">@tag.AsTag().Name</a> ]</text>
            }
        </div>
    </article>
}


